home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / casestdy / ch13_lev / 501.dcr / 00021_Main Movie Scripts.ls < prev    next >
Encoding:
Text File  |  1996-12-04  |  918 b   |  42 lines

  1. global gSuspend, white, gOldDepth, gCycleDur, gCycleStart, gLookAwayTime, g501HoldTime, gWatchHoldTime, gBeenHere, gPlatform, gThePage
  2.  
  3. on startMovie
  4.   if the machineType <> 256 then
  5.     set gPlatform to "Mac"
  6.   else
  7.     set gPlatform to "Win"
  8.   end if
  9.   if the movieName contains ".dir" then
  10.     initForLocal()
  11.   end if
  12.   set gCycleDur to 20 * 60
  13.   set gLookAwayTime to 8 * 60
  14.   set g501HoldTime to 20 * 60
  15.   set gWatchHoldTime to 2 * 60
  16.   set gCycleStart to the timer
  17.   set gBeenHere to 1
  18.   preLoad(2, 6)
  19.   preLoad(15, 16)
  20. end
  21.  
  22. on stopMovie
  23.   global gOldDepth, gBeenHere, gCpuTicks
  24.   set gBeenHere to 0
  25.   if gCpuTicks then
  26.     set the cpuHogTicks to gCpuTicks
  27.   end if
  28.   puppetPalette("Netscape 216+Cycle")
  29.   updateStage()
  30. end
  31.  
  32. on waitForTicks theTicks
  33.   set startTime to the timer
  34.   repeat while the timer < (theTicks + startTime)
  35.     nothing()
  36.   end repeat
  37. end
  38.  
  39. on initForLocal
  40.   installMenu(cast "file menu")
  41. end
  42.